#include<stdio.h>
//结构体的定义
struct Person 
{
  /* data */
  char name[10];
  int age;
  char gender;
  char id[10];
  float height;
  float weight;
};

int main()
{
  struct Person ys=
  {
    "ys",32,'M',"129",170.5,61.5
  };
  

  //访问结构体变量的成员三种方法
  printf("1 %s %d %c %s %.2lf %lf\n",ys.name,ys.age,ys.gender,ys.id,ys.height,ys.weight);
  struct Person *p=&ys;
  printf("2 %s %d %c %s %.2lf %lf\n",(*p).name,(*p).age,(*p).gender,(*p).id,(*p).height,(*p).weight);
  printf("3 %s %d %c %s %.2lf %lf\n",p->name,p->age,p->gender,p->id,p->height,p->weight);


  return 0;
}